package com.itheima.commons.model.vo;

import cn.hutool.core.convert.Convert;
import com.itheima.commons.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SimilarYouVo implements Serializable {
    //用户id
    private Integer id;
    //头像
    private String avatar;

    public SimilarYouVo(UserInfo userInfo) {
        this.id = Convert.toInt(userInfo.getUserId());
        this.avatar = userInfo.getLogo();
    }

}